home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / CMICCProfile.a < prev    next >
Encoding:
Text File  |  1997-08-12  |  28.7 KB  |  725 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        CMICCProfile.a
  3. ;
  4. ;    Contains:    Definitions for ColorSync 2.0 profile
  5. ;
  6. ;    Version:    Technology:    ColorSync 2.1
  7. ;                Release:    Universal Interfaces 3.0.1
  8. ;
  9. ;    Copyright:    © 1994-1997 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__CMICCPROFILE__') = 'UNDEFINED' THEN
  19. __CMICCPROFILE__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.  
  25. ;  Current CMProfile.header.profileVersion Major: 2, Minor: 0, Stage: Developement (x20), Prerelease:0x01 
  26.  
  27. cmCS2ProfileVersion                EQU        $02000000
  28. ;  Current Major version number 
  29.  
  30. cmCurrentProfileMajorVersion    EQU        $02000000
  31. ;  magic cookie number for anonymous file ID 
  32.  
  33. cmMagicNumber                    EQU        'acsp'
  34. ;  ColorSync profile version 1.0 
  35.  
  36. cmCS1ProfileVersion                EQU        $00000100
  37.  
  38. ; ***********************************************************************
  39. ; *************** ColorSync 2.0 profile specification *******************
  40. ; ***********************************************************************
  41. ; *** flags field  ***
  42.  
  43. cmICCReservedFlagsMask            EQU        $0000FFFF            ; these bits of the flags field are defined and reserved by ICC 
  44. cmEmbeddedMask                    EQU        $00000001            ; if bit 0 is 0 then not embedded profile, if 1 then embedded profile 
  45. cmEmbeddedUseMask                EQU        $00000002            ; if bit 1 is 0 then ok to use anywhere, if 1 then ok to use as embedded profile only 
  46. cmCMSReservedFlagsMask            EQU        $FFFF0000            ; these bits of the flags field are defined and reserved by CMS vendor 
  47. cmQualityMask                    EQU        $00030000            ; if bits 16-17 is 0 then normal, if 1 then draft, if 2 then best 
  48. cmInterpolationMask                EQU        $00040000            ; if bit 18 is 0 then interpolation, if 1 then lookup only 
  49. cmGamutCheckingMask                EQU        $00080000            ; if bit 19 is 0 then create gamut checking info, if 1 then no gamut checking info 
  50. ;  copyright-protection flag options 
  51.  
  52. cmEmbeddedProfile                EQU        0                    ; 0 is not embedded profile, 1 is embedded profile 
  53. cmEmbeddedUse                    EQU        1                    ; 0 is to use anywhere, 1 is to use as embedded profile only 
  54. ;  speed and quality flag options 
  55.  
  56. cmNormalMode                    EQU        0                    ; it uses the least significent two bits in the high word of flag 
  57. cmDraftMode                        EQU        1                    ; it should be evaulated like this: right shift 16 bits first, mask off the 
  58. cmBestMode                        EQU        2                    ; high 14 bits, and then compare with the enum to determine the option value 
  59.  
  60. ; *** deviceAttributes fields ***
  61.  
  62. cmICCReservedAttr0Mask            EQU        $0000FFFF            ; these bits of the deviceAttributes[0] field are defined and reserved by ICC 
  63. cmReflectiveTransparentMask        EQU        $00000001            ; if bit 0 is 0 then reflective media, if 1 then transparency media 
  64. cmGlossyMatteMask                EQU        $00000002            ; if bit 1 is 0 then glossy, if 1 then matte 
  65. cmVendorReservedAttr0Mask        EQU        $FFFF0000            ; these bits of the deviceAttributes[0] field are defined and reserved by device vendor 
  66. cmVendorReservedAttr1Mask        EQU        $FFFFFFFF            ; these bits of the deviceAttributes[1] field are defined and reserved by device vendor 
  67. ;  device/media attributes element values  
  68.  
  69. cmReflective                    EQU        0                    ; if bit 0 is 0 then reflective media, if 1 then transparency media 
  70. cmGlossy                        EQU        1                    ; if bit 1 is 0 then glossy, if 1 then matte 
  71.  
  72. ; *** renderingIntent field ***
  73.  
  74. cmPerceptual                    EQU        0                    ; Photographic images 
  75. cmRelativeColorimetric            EQU        1                    ; Logo Colors 
  76. cmSaturation                    EQU        2                    ; Business graphics 
  77. cmAbsoluteColorimetric            EQU        3                    ; Logo Colors 
  78.  
  79.  
  80. ;  data type element values 
  81.  
  82. cmAsciiData                        EQU        0
  83. cmBinaryData                    EQU        1
  84. ;  screen encodings  
  85.  
  86. cmPrtrDefaultScreens            EQU        0                    ; Use printer default screens.  0 is false, 1 is ture 
  87. cmLinesPer                        EQU        1                    ; 0 is LinesPerCm, 1 is LinesPerInch 
  88. ;  2.0 tag type information 
  89.  
  90. cmNumHeaderElements                EQU        10
  91. ;  public tags 
  92.  
  93. cmAToB0Tag                        EQU        'A2B0'
  94. cmAToB1Tag                        EQU        'A2B1'
  95. cmAToB2Tag                        EQU        'A2B2'
  96. cmBlueColorantTag                EQU        'bXYZ'
  97. cmBlueTRCTag                    EQU        'bTRC'
  98. cmBToA0Tag                        EQU        'B2A0'
  99. cmBToA1Tag                        EQU        'B2A1'
  100. cmBToA2Tag                        EQU        'B2A2'
  101. cmCalibrationDateTimeTag        EQU        'calt'
  102. cmCharTargetTag                    EQU        'targ'
  103. cmCopyrightTag                    EQU        'cprt'
  104. cmDeviceMfgDescTag                EQU        'dmnd'
  105. cmDeviceModelDescTag            EQU        'dmdd'
  106. cmGamutTag                        EQU        'gamt'
  107. cmGrayTRCTag                    EQU        'kTRC'
  108. cmGreenColorantTag                EQU        'gXYZ'
  109. cmGreenTRCTag                    EQU        'gTRC'
  110. cmLuminanceTag                    EQU        'lumi'
  111. cmMeasurementTag                EQU        'meas'
  112. cmMediaBlackPointTag            EQU        'bkpt'
  113. cmMediaWhitePointTag            EQU        'wtpt'
  114. cmNamedColorTag                    EQU        'ncol'
  115. cmNamedColor2Tag                EQU        'ncl2'
  116. cmPreview0Tag                    EQU        'pre0'
  117. cmPreview1Tag                    EQU        'pre1'
  118. cmPreview2Tag                    EQU        'pre2'
  119. cmProfileDescriptionTag            EQU        'desc'
  120. cmProfileSequenceDescTag        EQU        'pseq'
  121. cmPS2CRD0Tag                    EQU        'psd0'
  122. cmPS2CRD1Tag                    EQU        'psd1'
  123. cmPS2CRD2Tag                    EQU        'psd2'
  124. cmPS2CRD3Tag                    EQU        'psd3'
  125. cmPS2CSATag                        EQU        'ps2s'
  126. cmPS2RenderingIntentTag            EQU        'ps2i'
  127. cmRedColorantTag                EQU        'rXYZ'
  128. cmRedTRCTag                        EQU        'rTRC'
  129. cmScreeningDescTag                EQU        'scrd'
  130. cmScreeningTag                    EQU        'scrn'
  131. cmTechnologyTag                    EQU        'tech'
  132. cmUcrBgTag                        EQU        'bfd '
  133. cmViewingConditionsDescTag        EQU        'vued'
  134. cmViewingConditionsTag            EQU        'view'
  135. ;  custom tags 
  136.  
  137. cmPS2CRDVMSizeTag                EQU        'psvm'
  138. ;  technology tag descriptions 
  139.  
  140. cmTechnologyFilmScanner            EQU        'fscn'
  141. cmTechnologyReflectiveScanner    EQU        'rscn'
  142. cmTechnologyInkJetPrinter        EQU        'ijet'
  143. cmTechnologyThermalWaxPrinter    EQU        'twax'
  144. cmTechnologyElectrophotographicPrinter EQU 'epho'
  145. cmTechnologyElectrostaticPrinter EQU    'esta'
  146. cmTechnologyDyeSublimationPrinter EQU    'dsub'
  147. cmTechnologyPhotographicPaperPrinter EQU 'rpho'
  148. cmTechnologyFilmWriter            EQU        'fprn'
  149. cmTechnologyVideoMonitor        EQU        'vidm'
  150. cmTechnologyVideoCamera            EQU        'vidc'
  151. cmTechnologyProjectionTelevision EQU    'pjtv'
  152. cmTechnologyCRTDisplay            EQU        'CRT '
  153. cmTechnologyPMDisplay            EQU        'PMD '
  154. cmTechnologyAMDisplay            EQU        'AMD '
  155. cmTechnologyPhotoCD                EQU        'KPCD'
  156. cmTechnologyPhotoImageSetter    EQU        'imgs'
  157. cmTechnologyGravure                EQU        'grav'
  158. cmTechnologyOffsetLithography    EQU        'offs'
  159. cmTechnologySilkscreen            EQU        'silk'
  160. cmTechnologyFlexography            EQU        'flex'
  161. ;  type signatures 
  162.  
  163. cmSigCurveType                    EQU        'curv'
  164. cmSigDataType                    EQU        'data'
  165. cmSigDateTimeType                EQU        'dtim'
  166. cmSigLut16Type                    EQU        'mft2'
  167. cmSigLut8Type                    EQU        'mft1'
  168. cmSigMeasurementType            EQU        'meas'
  169. cmSigNamedColorType                EQU        'ncol'
  170. cmSigNamedColor2Type            EQU        'ncl2'
  171. cmSigProfileDescriptionType        EQU        'desc'
  172. cmSigScreeningType                EQU        'scrn'
  173. cmSigS15Fixed16Type                EQU        'sf32'
  174. cmSigSignatureType                EQU        'sig '
  175. cmSigTextType                    EQU        'text'
  176. cmSigU16Fixed16Type                EQU        'uf32'
  177. cmSigU1Fixed15Type                EQU        'uf16'
  178. cmSigUInt32Type                    EQU        'ui32'
  179. cmSigUInt64Type                    EQU        'ui64'
  180. cmSigUInt8Type                    EQU        'ui08'
  181. cmSigViewingConditionsType        EQU        'view'
  182. cmSigXYZType                    EQU        'XYZ '
  183. ;  Measurement type encodings 
  184. ;  Measurement Flare 
  185.  
  186. cmFlare0                        EQU        $00000000
  187. cmFlare100                        EQU        $00000001
  188. ;  Measurement Geometry    
  189.  
  190. cmGeometryUnknown                EQU        $00000000
  191. cmGeometry045or450                EQU        $00000001
  192. cmGeometry0dord0                EQU        $00000002
  193. ;  Standard Observer    
  194.  
  195. cmStdobsUnknown                    EQU        $00000000
  196. cmStdobs1931TwoDegrees            EQU        $00000001
  197. cmStdobs1964TenDegrees            EQU        $00000002
  198. ;  Standard Illuminant 
  199.  
  200. cmIlluminantUnknown                EQU        $00000000
  201. cmIlluminantD50                    EQU        $00000001
  202. cmIlluminantD65                    EQU        $00000002
  203. cmIlluminantD93                    EQU        $00000003
  204. cmIlluminantF2                    EQU        $00000004
  205. cmIlluminantD55                    EQU        $00000005
  206. cmIlluminantA                    EQU        $00000006
  207. cmIlluminantEquiPower            EQU        $00000007
  208. cmIlluminantF8                    EQU        $00000008
  209. ;  Spot Function Value 
  210.  
  211. cmSpotFunctionUnknown            EQU        0
  212. cmSpotFunctionDefault            EQU        1
  213. cmSpotFunctionRound                EQU        2
  214. cmSpotFunctionDiamond            EQU        3
  215. cmSpotFunctionEllipse            EQU        4
  216. cmSpotFunctionLine                EQU        5
  217. cmSpotFunctionSquare            EQU        6
  218. cmSpotFunctionCross                EQU        7
  219. ;  Color Space Signatures 
  220.  
  221. cmXYZData                        EQU        'XYZ '
  222. cmLabData                        EQU        'Lab '
  223. cmLuvData                        EQU        'Luv '
  224. cmYxyData                        EQU        'Yxy '
  225. cmRGBData                        EQU        'RGB '
  226. cmGrayData                        EQU        'GRAY'
  227. cmHSVData                        EQU        'HSV '
  228. cmHLSData                        EQU        'HLS '
  229. cmCMYKData                        EQU        'CMYK'
  230. cmCMYData                        EQU        'CMY '
  231. cmMCH5Data                        EQU        'MCH5'
  232. cmMCH6Data                        EQU        'MCH6'
  233. cmMCH7Data                        EQU        'MCH7'
  234. cmMCH8Data                        EQU        'MCH8'
  235. ;  profileClass enumerations 
  236.  
  237. cmInputClass                    EQU        'scnr'
  238. cmDisplayClass                    EQU        'mntr'
  239. cmOutputClass                    EQU        'prtr'
  240. cmLinkClass                        EQU        'link'
  241. cmAbstractClass                    EQU        'abst'
  242. cmColorSpaceClass                EQU        'spac'
  243. cmNamedColorClass                EQU        'nmcl'
  244. ;  platform enumerations 
  245.  
  246. cmMacintosh                        EQU        'APPL'
  247. cmMicrosoft                        EQU        'MSFT'
  248. cmSolaris                        EQU        'SUNW'
  249. cmSiliconGraphics                EQU        'SGI '
  250. cmTaligent                        EQU        'TGNT'
  251. ;  ColorSync 1.0 elements 
  252.  
  253. cmCS1ChromTag                    EQU        'chrm'
  254. cmCS1TRCTag                        EQU        'trc '
  255. cmCS1NameTag                    EQU        'name'
  256. cmCS1CustTag                    EQU        'cust'
  257. ;  General element data types 
  258. CMDateTime                RECORD 0
  259. year                     ds.w    1                ; offset: $0 (0)
  260. month                     ds.w    1                ; offset: $2 (2)
  261. dayOfTheMonth             ds.w    1                ; offset: $4 (4)
  262. hours                     ds.w    1                ; offset: $6 (6)
  263. minutes                     ds.w    1                ; offset: $8 (8)
  264. seconds                     ds.w    1                ; offset: $A (10)
  265. sizeof                     EQU *                    ; size:   $C (12)
  266.                         ENDR
  267. CMFixedXYZColor            RECORD 0
  268. X                         ds.l    1                ; offset: $0 (0)
  269. Y                         ds.l    1                ; offset: $4 (4)
  270. Z                         ds.l    1                ; offset: $8 (8)
  271. sizeof                     EQU *                    ; size:   $C (12)
  272.                         ENDR
  273. ; typedef unsigned short                 CMXYZComponent
  274.  
  275. CMXYZColor                RECORD 0
  276. X                         ds.w    1                ; offset: $0 (0)
  277. Y                         ds.w    1                ; offset: $2 (2)
  278. Z                         ds.w    1                ; offset: $4 (4)
  279. sizeof                     EQU *                    ; size:   $6 (6)
  280.                         ENDR
  281. CM2Header                RECORD 0
  282. size                     ds.l    1                ; offset: $0 (0)        ;  This is the total size of the Profile 
  283. CMMType                     ds.l    1                ; offset: $4 (4)        ;  CMM signature,  Registered with CS2 consortium  
  284. profileVersion             ds.l    1                ; offset: $8 (8)        ;  Version of CMProfile format 
  285. profileClass             ds.l    1                ; offset: $C (12)        ;  input, display, output, devicelink, abstract, or color conversion profile type 
  286. dataColorSpace             ds.l    1                ; offset: $10 (16)        ;  color space of data 
  287. profileConnectionSpace     ds.l    1                ; offset: $14 (20)        ;  profile connection color space 
  288. dateTime                 ds        CMDateTime        ; offset: $18 (24)        ;  date and time of profile creation 
  289. CS2profileSignature         ds.l    1                ; offset: $24 (36)        ;  'acsp' constant ColorSync 2.0 file ID 
  290. platform                 ds.l    1                ; offset: $28 (40)        ;  primary profile platform, Registered with CS2 consortium 
  291. flags                     ds.l    1                ; offset: $2C (44)        ;  profile flags 
  292. deviceManufacturer         ds.l    1                ; offset: $30 (48)        ;  Registered with ICC consortium 
  293. deviceModel                 ds.l    1                ; offset: $34 (52)        ;  Registered with ICC consortium 
  294. deviceAttributes         ds.l    2                ; offset: $38 (56)        ;  Attributes like paper type 
  295. renderingIntent             ds.l    1                ; offset: $40 (64)        ;  preferred rendering intent of tagged object 
  296. white                     ds        CMFixedXYZColor ; offset: $44 (68)        ;  profile illuminant 
  297. creator                     ds.l    1                ; offset: $50 (80)        ;  profile creator 
  298. reserved                 ds.b    44                ; offset: $54 (84)        ;  reserved for future use 
  299. sizeof                     EQU *                    ; size:   $80 (128)
  300.                         ENDR
  301. CMTagRecord                RECORD 0
  302. tag                         ds.l    1                ; offset: $0 (0)        ;  Registered with CS2 consortium 
  303. elementOffset             ds.l    1                ; offset: $4 (4)        ;  Relative to start of CMProfile 
  304. elementSize                 ds.l    1                ; offset: $8 (8)
  305. sizeof                     EQU *                    ; size:   $C (12)
  306.                         ENDR
  307. CMTagElemTable            RECORD 0
  308. count                     ds.l    1                ; offset: $0 (0)
  309. tagList                     ds        CMTagRecord        ; offset: $4 (4) <-- really an array of length one ;  Variable size 
  310. sizeof                     EQU *                    ; size:   $10 (16)
  311.                         ENDR
  312. ;  External 0x02002001 CMProfile 
  313. CM2Profile                RECORD 0
  314. header                     ds        CM2Header        ; offset: $0 (0)
  315. tagTable                 ds        CMTagElemTable ; offset: $80 (128)
  316. elemData                 ds.b    1                ; offset: $90 (144) <-- really an array of length one ;  Tagged element storage. Variable size 
  317.                          ORG 146
  318. sizeof                     EQU *                    ; size:   $92 (146)
  319.                         ENDR
  320. ; typedef struct CM2Profile *            CM2ProfilePtr
  321.  
  322. ; typedef CM2ProfilePtr *                CM2ProfileHandle
  323.  
  324. ;  Tag Type Definitions 
  325. CMCurveType                RECORD 0
  326. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'curv' 
  327. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  328. countValue                 ds.l    1                ; offset: $8 (8)        ;  number of entries in table that follows 
  329. data                     ds.w    1                ; offset: $C (12) <-- really an array of length one ;  Tagged element storage. Variable size 
  330. sizeof                     EQU *                    ; size:   $E (14)
  331.                         ENDR
  332. CMDataType                RECORD 0
  333. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'data' 
  334. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  335. dataFlag                 ds.l    1                ; offset: $8 (8)        ;  0 = ASCII, 1 = binary 
  336. data                     ds.b    1                ; offset: $C (12) <-- really an array of length one ;  Tagged element storage. Variable size 
  337.                          ORG 14
  338. sizeof                     EQU *                    ; size:   $E (14)
  339.                         ENDR
  340. CMDateTimeType            RECORD 0
  341. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'dtim' 
  342. reserved                 ds.l    1                ; offset: $4 (4)
  343. dateTime                 ds        CMDateTime        ; offset: $8 (8)
  344. sizeof                     EQU *                    ; size:   $14 (20)
  345.                         ENDR
  346. CMLut16Type                RECORD 0
  347. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'mft2' 
  348. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  349. inputChannels             ds.b    1                ; offset: $8 (8)        ;  Number of input channels 
  350. outputChannels             ds.b    1                ; offset: $9 (9)        ;  Number of output channels 
  351. gridPoints                 ds.b    1                ; offset: $A (10)        ;  Number of clutTable grid points 
  352. reserved2                 ds.b    1                ; offset: $B (11)        ;  fill with 0x00 
  353. matrix                     ds.l    3 * 3            ; offset: $C (12)        ;  
  354. inputTableEntries         ds.w    1                ; offset: $30 (48)        ;  
  355. outputTableEntries         ds.w    1                ; offset: $32 (50)        ;  
  356. inputTable                 ds.w    1                ; offset: $34 (52) <-- really an array of length one ;  Variable size 
  357. CLUT                     ds.w    1                ; offset: $36 (54) <-- really an array of length one ;  Variable size 
  358. outputTable                 ds.w    1                ; offset: $38 (56) <-- really an array of length one ;  Variable size 
  359. sizeof                     EQU *                    ; size:   $3A (58)
  360.                         ENDR
  361. CMLut8Type                RECORD 0
  362. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'mft1' 
  363. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  364. inputChannels             ds.b    1                ; offset: $8 (8)        ;  
  365. outputChannels             ds.b    1                ; offset: $9 (9)        ;  
  366. gridPoints                 ds.b    1                ; offset: $A (10)        ;  
  367. reserved2                 ds.b    1                ; offset: $B (11)        ;  fill with 0x00 
  368. matrix                     ds.l    3 * 3            ; offset: $C (12)        ;  
  369. inputTable                 ds.b    256                ; offset: $30 (48)        ;  fixed size of 256 
  370. CLUT                     ds.b    2                ; offset: $130 (304)    ;  Variable size 
  371. outputTable                 ds.b    256                ; offset: $132 (306)    ;  fixed size of 256 
  372. sizeof                     EQU *                    ; size:   $232 (562)
  373.                         ENDR
  374. CMMeasurementType        RECORD 0
  375. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'meas' 
  376. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  377. standardObserver         ds.l    1                ; offset: $8 (8)        ;  0 : unknown, 1 : CIE 1931, 2 : CIE 1964 
  378. backingXYZ                 ds        CMFixedXYZColor ; offset: $C (12)        ;  absolute XYZ values of backing 
  379. geometry                 ds.l    1                ; offset: $18 (24)        ;  0 : unknown, 1 : 0/45 or 45/0, 2 :0/d or d/0 
  380. flare                     ds.l    1                ; offset: $1C (28)        ;  0 : 0%, 1 : 100% flare 
  381. illuminant                 ds.l    1                ; offset: $20 (32)        ;  standard illuminant 
  382. sizeof                     EQU *                    ; size:   $24 (36)
  383.                         ENDR
  384. CMNamedColorType        RECORD 0
  385. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ncol' 
  386. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  387. vendorFlag                 ds.l    1                ; offset: $8 (8)        ;  
  388. count                     ds.l    1                ; offset: $C (12)        ;  count of named colors in array that follows 
  389. prefixName                 ds.b    1                ; offset: $10 (16) <-- really an array of length one ;  Variable size, max = 32, to access fields after this one, have to count bytes 
  390. suffixName                 ds.b    1                ; offset: $11 (17) <-- really an array of length one ;  Variable size, max = 32 
  391. data                     ds.b    1                ; offset: $12 (18) <-- really an array of length one ;  varaible size data as explained below 
  392.                          ORG 20
  393. sizeof                     EQU *                    ; size:   $14 (20)
  394.                         ENDR
  395. ;     
  396. ;    A variable size array of structs appears as the last block of data
  397. ;    in the above struct, CMNamedColorType.  The data structure
  398. ;    is as follows: (example in C)
  399. ;    
  400. ;     struct {                                             
  401. ;            unsigned char    rootName[1];                 * Variable size, max = 32 
  402. ;            unsigned char    colorCoords[1];                 * Variable size  
  403. ;     } colorName[1];                                     * Variable size  
  404. ;
  405.  
  406. CMNamedColor2Type        RECORD 0
  407. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ncl2' 
  408. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  409. vendorFlag                 ds.l    1                ; offset: $8 (8)        ;  lower 16 bits reserved for ICC use 
  410. count                     ds.l    1                ; offset: $C (12)        ;  count of named colors in array that follows 
  411. deviceChannelCount         ds.l    1                ; offset: $10 (16)        ;  number of device channels, 0 indicates no device value available 
  412. prefixName                 ds.b    32                ; offset: $14 (20)        ;  32 byte field.  7 bit ASCII null terminated 
  413. suffixName                 ds.b    32                ; offset: $34 (52)        ;  32 byte field.  7 bit ASCII null terminated 
  414. data                     ds.b    1                ; offset: $54 (84) <-- really an array of length one ;  varaible size data as explained below 
  415.                          ORG 86
  416. sizeof                     EQU *                    ; size:   $56 (86)
  417.                         ENDR
  418. ;     
  419. ;    A variable size array of structs appears as the last block of data
  420. ;    in the above struct, CMNamedColor2Type.  The data structure
  421. ;    is as follows: (example in C)
  422. ;    
  423. ;     struct {                                             
  424. ;            unsigned char    rootName[1];                 * 32 byte field.  7 bit ASCII null terminated
  425. ;            unsigned char    PCSColorCoords[1];             * Variable size  
  426. ;            unsigned char    DeviceColorCoords[1];         * Variable size  
  427. ;     } colorName2[1];                                     * Variable size  
  428. ;
  429.  
  430.  
  431. CMTextDescriptionType    RECORD 0
  432. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'desc' 
  433. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  434. ASCIICount                 ds.l    1                ; offset: $8 (8)        ;  the count of "bytes" 
  435. ASCIIName                 ds.b    2                ; offset: $C (12)        ;  Variable size, to access fields after this one, have to count bytes 
  436. UniCodeCode                 ds.l    1                ; offset: $E (14)
  437. UniCodeCount             ds.l    1                ; offset: $12 (18)        ;  the count of characters, each character has two bytes 
  438. UniCodeName                 ds.b    2                ; offset: $16 (22)        ;  Variable size 
  439. ScriptCodeCode             ds.w    1                ; offset: $18 (24)
  440. ScriptCodeCount             ds.b    1                ; offset: $1A (26)        ;  the count of "bytes" 
  441.                          ORG 28
  442. ScriptCodeName             ds.b    2                ; offset: $1C (28)        ;  Variable size 
  443. sizeof                     EQU *                    ; size:   $1E (30)
  444.                         ENDR
  445. CMTextType                RECORD 0
  446. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'text' 
  447. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  448. text                     ds.b    1                ; offset: $8 (8) <-- really an array of length one ;  count of text is obtained from tag size element 
  449.                          ORG 10
  450. sizeof                     EQU *                    ; size:   $A (10)
  451.                         ENDR
  452. CMScreeningType            RECORD 0
  453. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'scrn' 
  454. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  455. screeningFlag             ds.l    1                ; offset: $8 (8)        ;  bit 0 : use printer default screens, bit 1 : inch/cm 
  456. channelCount             ds.l    1                ; offset: $C (12)
  457. data                     ds.b    1                ; offset: $10 (16) <-- really an array of length one ;  varaible size data as explained below 
  458.                          ORG 18
  459. sizeof                     EQU *                    ; size:   $12 (18)
  460.                         ENDR
  461. ;    A variable size array of structs appears as the last block of data
  462. ;    in the above struct, CMScreeningType.  The data structure
  463. ;    is as follows: (example in C)
  464. ;    
  465. ;    struct {
  466. ;        Fixed            frequency;
  467. ;        Fixed            angle;
  468. ;        unsigned long    sportFunction;
  469. ;     }    channelScreening[1];                             * Variable size 
  470. ;
  471.  
  472. CMSignatureType            RECORD 0
  473. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'sig ' 
  474. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  475. signature                 ds.l    1                ; offset: $8 (8)
  476. sizeof                     EQU *                    ; size:   $C (12)
  477.                         ENDR
  478. CMS15Fixed16ArrayType    RECORD 0
  479. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'sf32' 
  480. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  481. value                     ds.l    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size 
  482. sizeof                     EQU *                    ; size:   $C (12)
  483.                         ENDR
  484. CMU16Fixed16ArrayType    RECORD 0
  485. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'uf32' 
  486. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  487. value                     ds.l    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size 
  488. sizeof                     EQU *                    ; size:   $C (12)
  489.                         ENDR
  490. CMUInt16ArrayType        RECORD 0
  491. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ui16' 
  492. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  493. value                     ds.w    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size 
  494. sizeof                     EQU *                    ; size:   $A (10)
  495.                         ENDR
  496. CMUInt32ArrayType        RECORD 0
  497. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ui32' 
  498. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  499. value                     ds.l    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size 
  500. sizeof                     EQU *                    ; size:   $C (12)
  501.                         ENDR
  502. CMUInt64ArrayType        RECORD 0
  503. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ui64' 
  504. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  505. value                     ds.l    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size (x2) 
  506. sizeof                     EQU *                    ; size:   $C (12)
  507.                         ENDR
  508. CMUInt8ArrayType        RECORD 0
  509. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ui08' 
  510. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  511. value                     ds.b    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size 
  512.                          ORG 10
  513. sizeof                     EQU *                    ; size:   $A (10)
  514.                         ENDR
  515. CMViewingConditionsType    RECORD 0
  516. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'view' 
  517. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  518. illuminant                 ds        CMFixedXYZColor ; offset: $8 (8)        ;  absolute XYZs of illuminant  in cd/m^2 
  519. surround                 ds        CMFixedXYZColor ; offset: $14 (20)        ;  absolute XYZs of surround in cd/m^2 
  520. stdIlluminant             ds.l    1                ; offset: $20 (32)        ;  see definitions of std illuminants 
  521. sizeof                     EQU *                    ; size:   $24 (36)
  522.                         ENDR
  523. CMXYZType                RECORD 0
  524. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'XYZ ' 
  525. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  526. XYZ                         ds        CMFixedXYZColor ; offset: $8 (8) <-- really an array of length one ;  variable size XYZ tristimulus values 
  527. sizeof                     EQU *                    ; size:   $14 (20)
  528.                         ENDR
  529. ;  Profile sequence description type 
  530. CMProfileSequenceDescType RECORD 0
  531. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'pseq ' 
  532. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  533. count                     ds.l    1                ; offset: $8 (8)        ;  Number of descriptions 
  534. data                     ds.b    1                ; offset: $C (12) <-- really an array of length one ;  varaible size data as explained below 
  535.                          ORG 14
  536. sizeof                     EQU *                    ; size:   $E (14)
  537.                         ENDR
  538. ;    A variable size array of structs appears as the last block of data
  539. ;    in the above struct, CMProfileSequenceDescType.  The data structure
  540. ;    is as follows: (example in C)
  541. ;    
  542. ;     struct {                                             
  543. ;            OSType            deviceMfg;                     * Device Manufacturer 
  544. ;            OSType            deviceModel;                 * Decvice Model 
  545. ;            unsigned long    attributes[2];                 * Device attributes 
  546. ;            OSType            technology;                     * Technology signature 
  547. ;            unsigned long    mfgDescASCIICount;             * the count of "bytes" 
  548. ;            unsigned char    mfgDescASCIIName[2];         * Variable size 
  549. ;            unsigned long    mfgDescUniCodeCode;             
  550. ;            unsigned long    mfgDescUniCodeCount;         * the count of characters, each character has two bytes 
  551. ;            unsigned char    mfgDescUniCodeName[2];         * Variable size 
  552. ;            unsigned long    mfgDescScriptCodeCode;         
  553. ;            unsigned long    mfgDescScriptCodeCount;         * the count of "bytes" 
  554. ;            unsigned char    mfgDescScriptCodeName[2];     * Variable size 
  555. ;            unsigned long    modelDescASCIICount;         * the count of "bytes" 
  556. ;            unsigned char    modelDescASCIIName[2];         * Variable size 
  557. ;            unsigned long    modelDescUniCodeCode;         
  558. ;            unsigned long    modelDescUniCodeCount;         * the count of characters, each character has two bytes 
  559. ;            unsigned char    modelDescUniCodeName[2];     * Variable size 
  560. ;            short            modelDescScriptCodeCode;     
  561. ;            unsigned char    modelDescScriptCodeCount;     * the count of "bytes" 
  562. ;            SInt8            filler;                         * For proper alignment across languages 
  563. ;            unsigned char    modelDescScriptCodeName[2];     * Variable size 
  564. ;     }    profileDescription[1];                         
  565. ;
  566.  
  567.  
  568. ;  Under color removal, black generation type 
  569. CMUcrBgType                RECORD 0
  570. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'bfd  ' 
  571. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  572. ucrCount                 ds.l    1                ; offset: $8 (8)        ;  Number of UCR entries 
  573. ucrValues                 ds.w    1                ; offset: $C (12) <-- really an array of length one ;  variable size 
  574. bgCount                     ds.l    1                ; offset: $E (14)        ;  Number of BG entries 
  575. bgValues                 ds.w    1                ; offset: $12 (18) <-- really an array of length one ;  variable size 
  576. ucrbgASCII                 ds.b    1                ; offset: $14 (20) <-- really an array of length one ;  null terminated ASCII string 
  577.                          ORG 22
  578. sizeof                     EQU *                    ; size:   $16 (22)
  579.                         ENDR
  580. CMIntentCRDVMSize        RECORD 0
  581. renderingIntent             ds.l    1                ; offset: $0 (0)        ;  rendering intent 
  582. VMSize                     ds.l    1                ; offset: $4 (4)        ;  VM size taken up by the CRD 
  583. sizeof                     EQU *                    ; size:   $8 (8)
  584.                         ENDR
  585. CMPS2CRDVMSizeType        RECORD 0
  586. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'psvm' 
  587. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  588. count                     ds.l    1                ; offset: $8 (8)        ;  number of intent entries 
  589. intentCRD                 ds        CMIntentCRDVMSize ; offset: $C (12) <-- really an array of length one ;  variable size 
  590. sizeof                     EQU *                    ; size:   $14 (20)
  591.                         ENDR
  592. ; ***********************************************************************
  593. ; *************** ColorSync 1.0 profile specification *******************
  594. ; ***********************************************************************
  595.  
  596. cmGrayResponse                    EQU        0
  597. cmRedResponse                    EQU        1
  598. cmGreenResponse                    EQU        2
  599. cmBlueResponse                    EQU        3
  600. cmCyanResponse                    EQU        4
  601. cmMagentaResponse                EQU        5
  602. cmYellowResponse                EQU        6
  603. cmUcrResponse                    EQU        7
  604. cmBgResponse                    EQU        8
  605. cmOnePlusLastResponse            EQU        9
  606.  
  607. ;  Device types 
  608.  
  609. cmMonitorDevice                    EQU        'mntr'
  610. cmScannerDevice                    EQU        'scnr'
  611. cmPrinterDevice                    EQU        'prtr'
  612.  
  613. CMIString                RECORD 0
  614. theScript                 ds.w    1                ; offset: $0 (0)
  615. theString                 ds        Str63            ; offset: $2 (2)
  616. sizeof                     EQU *                    ; size:   $42 (66)
  617.                         ENDR
  618. ;  Profile options 
  619.  
  620. cmPerceptualMatch                EQU        $0000                ; Default. For photographic images 
  621. cmColorimetricMatch                EQU        $0001                ; Exact matching when possible 
  622. cmSaturationMatch                EQU        $0002                ; For solid colors 
  623. ;  Profile flags 
  624.  
  625. cmNativeMatchingPreferred        EQU        $00000001            ; Default to native not preferred 
  626. cmTurnOffCache                    EQU        $00000002            ; Default to turn on CMM cache 
  627. ; typedef long                             CMMatchOption
  628.  
  629. ; typedef long                             CMMatchFlag
  630.  
  631. CMHeader                RECORD 0
  632. size                     ds.l    1                ; offset: $0 (0)
  633. CMMType                     ds.l    1                ; offset: $4 (4)
  634. applProfileVersion         ds.l    1                ; offset: $8 (8)
  635. dataType                 ds.l    1                ; offset: $C (12)
  636. deviceType                 ds.l    1                ; offset: $10 (16)
  637. deviceManufacturer         ds.l    1                ; offset: $14 (20)
  638. deviceModel                 ds.l    1                ; offset: $18 (24)
  639. deviceAttributes         ds.l    2                ; offset: $1C (28)
  640. profileNameOffset         ds.l    1                ; offset: $24 (36)
  641. customDataOffset         ds.l    1                ; offset: $28 (40)
  642. flags                     ds.l    1                ; offset: $2C (44)
  643. options                     ds.l    1                ; offset: $30 (48)
  644. white                     ds        CMXYZColor        ; offset: $34 (52)
  645. black                     ds        CMXYZColor        ; offset: $3A (58)
  646. sizeof                     EQU *                    ; size:   $40 (64)
  647.                         ENDR
  648. CMProfileChromaticities    RECORD 0
  649. red                         ds        CMXYZColor        ; offset: $0 (0)
  650. green                     ds        CMXYZColor        ; offset: $6 (6)
  651. blue                     ds        CMXYZColor        ; offset: $C (12)
  652. cyan                     ds        CMXYZColor        ; offset: $12 (18)
  653. magenta                     ds        CMXYZColor        ; offset: $18 (24)
  654. yellow                     ds        CMXYZColor        ; offset: $1E (30)
  655. sizeof                     EQU *                    ; size:   $24 (36)
  656.                         ENDR
  657. CMProfileResponse        RECORD 0
  658. counts                     ds.w    9                ; offset: $0 (0)
  659. data                     ds.w    1                ; offset: $12 (18) <-- really an array of length one ;  Variable size 
  660. sizeof                     EQU *                    ; size:   $14 (20)
  661.                         ENDR
  662. CMProfile                RECORD 0
  663. header                     ds        CMHeader        ; offset: $0 (0)
  664. profile                     ds        CMProfileChromaticities ; offset: $40 (64)
  665. response                 ds        CMProfileResponse ; offset: $64 (100)
  666. profileName                 ds        CMIString        ; offset: $78 (120)
  667. customData                 ds.b    1                ; offset: $BA (186) <-- really an array of length one ;  Variable size 
  668.                          ORG 188
  669. sizeof                     EQU *                    ; size:   $BC (188)
  670.                         ENDR
  671. ; typedef struct CMProfile *            CMProfilePtr
  672.  
  673. ; typedef CMProfilePtr *                CMProfileHandle
  674.  
  675.     IF OLDROUTINENAMES THEN
  676.  
  677. kCMApplProfileVersion            EQU        $00000100
  678.  
  679. grayResponse                    EQU        0
  680. redResponse                        EQU        1
  681. greenResponse                    EQU        2
  682. blueResponse                    EQU        3
  683. cyanResponse                    EQU        4
  684. magentaResponse                    EQU        5
  685. yellowResponse                    EQU        6
  686. ucrResponse                        EQU        7
  687. bgResponse                        EQU        8
  688. onePlusLastResponse                EQU        9
  689.  
  690. rgbData                            EQU        'RGB '
  691. cmykData                        EQU        'CMYK'
  692. grayData                        EQU        'GRAY'
  693. xyzData                            EQU        'XYZ '
  694.  
  695. monitorDevice                    EQU        'mntr'
  696. scannerDevice                    EQU        'scnr'
  697. printerDevice                    EQU        'prtr'
  698. ; typedef unsigned short                 XYZComponent
  699.  
  700. XYZColor                RECORD 0
  701. f                         ds        CMXYZColor
  702. sizeof                     EQU *                    ; size:   $6 (6)
  703.                         ENDR
  704.  
  705.  
  706. ; typedef unsigned short                 CMResponseData
  707.  
  708. IString                    RECORD 0
  709. f                         ds        CMIString
  710. sizeof                     EQU *                    ; size:   $42 (66)
  711.                         ENDR
  712.  
  713.  
  714. ; typedef long                             CMResponseColor
  715.  
  716. ; typedef CMResponseColor                 responseColor
  717.  
  718.  
  719.     ENDIF    ; OLDROUTINENAMES
  720.  
  721.     ENDIF ; __CMICCPROFILE__ 
  722.  
  723.